package com.peking.donations.service;

import com.peking.donations.base.service.BizServiceException;
import com.peking.donations.model.CallOrder;
import com.peking.donations.model.DonationSaving;
import com.peking.donations.vo.GiftCallMember;
import com.peking.donations.vo.GiftCallVo;

import java.security.acl.Group;
import java.util.List;
import java.util.Map;

/**
 * Created by wyz on 16/4/27.
 */
public interface BizService {

    DonationSaving createDonationSaving(DonationSaving saving);

    DonationSaving updateSavingStatus(DonationSaving saving);

    int accountUserShare(int userId);

    int accountCallOrderShare(int orderId);

    DonationSaving findSavingByTransactionId(String transactionId);

    /**
     * 活动统计
     *
     * @return
     */
    Map<String, Integer> countTotal();

    /**
     * 保存召集令
     * 
     * @param callOrder
     * @return
     */
    CallOrder saveCallOrder(CallOrder callOrder) throws BizServiceException;

    /**
     * 查询排名前十的召集令
     * 
     * @return
     */
    List<GiftCallVo> findGiftCallTop10();

    /**
     * 查询该召集令现在招募状态
     * 
     * @param gcId
     * @return
     */
    GiftCallVo getGiftCall(Integer gcId);

    /**
     * 查询该召集令排名及发起时间排名
     * 
     * @param gcId
     * @return
     */
    Map<String, Integer> findGiftCallSorts(Integer gcId);

    /**
     * 分页查询该召集令参与人情况
     * 
     * @param gcId
     * @return
     */
    List<GiftCallMember> findGiftCallMembersTop10(Integer gcId, int page);

    /**
     * 获取用户院系排名
     * @param userId
     * @return
     */
    Map<String,Integer> findDepartmentOrder(int userId);

    /**
     * 查询指定的召集令
     * @param orderId
     * @return
     */

    CallOrder findCallOrderById(int orderId);

}
